<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'No promotion, at least for a while',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/07/26.jpg" alt="An interesting-looking plant beside the bike path" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		I forgot to get breakfast cereal the other day, so I&apos;ve run out.
		For all three meals, I just had slices of muffuletta.
		I also snacked on dried cherries.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			Hey, it&apos;s Big Buck Bunny, one of the films from the Blender team!
			I&apos;ve always thought that film was pretty cute, and even better, it&apos;s freely-licensed.
		</p>
		<p>
			Anyway, before we can discuss which of the five types of animation listed in the discussion assignment were likely used for this film, we need to define each of these animation types.
		</p>
		<h3>Real-time animation</h3>
		<p>
			Real-time animation is animation that is generated by the program as it is needed.
			Each frame is generated on demand, which can allow for things such as interactivity.
			The downside to this though is that either the animation will be incredibly slow and appear laggy or the animation to be rendered will have to be incredibly simple (Cunningham, 2003).
			Complex animations take too much processing power to be rendered quickly.
		</p>
		<h3>Frame-at-a-time animation</h3>
		<p>
			Frame-at-a-time animation is rendered long in advance of when it is displayed.
			It&apos;s sort of like how a a program written in C is compiled long in advance of being run.
			This allows long render times to be dealt with once, while the animation can later be viewed countless times much quicker.
			Complex animations are much more viable when using frame-at-a-time animation (Cunningham, 2003), but the downside is that with frame-at-a-time animation, your animation cannot be in any way interactive.
			This technique is common for animated films.
		</p>
		<h3>Procedural animation</h3>
		<p>
			Procedural animation is animation in which each frame uses values computed by a program (Cunningham, 2003).
			For example, in the animations we&apos;ve been submitting as assignments, we&apos;ve often needed to include lines that are executed before rendering each frame, such as <code><var>object.y</var> += <var>increment</var>;</code> to make an object rise (if <var>increment</var> is positive) of fall (if <var>increment</var> is negative).
			This is procedural animation.
			It works quite well for simple animations in which the frames are easy to compute and don&apos;t need to follow complex, real-world logic.
		</p>
		<h3>Keyframe animation</h3>
		<p>
			Keyframe animation is animation in which you define particular frames that you want to exist at particular points, and let the computer figure out how to move the objects between the two states (the state of the frame before a period and the state of the frame after a period) (Cunningham, 2003).
			This sort of animation is similar to procedural animation, but differs in that it has various segments that transition between preset values.
		</p>
		<h3>Interpolation animation</h3>
		<p>
			Interpolation animation takes two states with very different objects and generates a sequence in which one object transforms to become the other object from the other state.
			It can be used for &quot;morphing animations&quot; (Cunningham, 2003), but doesn&apos;t really work for typical motion animations.
		</p>
		<h3>All of this in the context of Big Buck Bunny</h3>
		<p>
			We know that Big Buck Bunny uses frame-at-a-time animation, because it&apos;s not computed and rendered in real time.
			We aren&apos;t running an application that generates Big Buck Bunny as it goes, but instead, are watching the prerendered video of the animation.
			That means that this doesn&apos;t use real-time animation, which would be the opposite.
			The obvious reason this was done is because they were trying to release a film, not a program, but also, this allowed for a level of detail that wouldn&apos;t work well otherwise.
			For example, you could see the individual hairs on the bunny blowing in the wind.
			That would have been computationally expensive to render, and slow if done in real time.
			Procedural animation doesn&apos;t seem like the right tool for generating Big Buck Bunny either.
			The animation is too complex.
			And interpolation animation isn&apos;t right either, ans we don&apos;t really see any transformations.
			The closest thing to a transformation would be when the flying squirrel opens its arm flaps.
			I&apos;m not sure the model prior to spreading its &quot;wings&quot; had those flaps, as they certainly didn&apos;t show up.
			You don&apos;t realise that you&apos;re looking at a flying squirrel until that point in the animation.
			However, my guess is that even here, interpolation animation was not used, and the arm flaps were probably built into the model all along.
			That leaves keyframe animations.
			Keyframe animation seems much closer to what we see in the animation.
			I could easily point out likely places for a keyframe to be put all throughout the animation, and the transitions between these frames should be as smooth as what we see in the film.
			Keyframe animation would likely have been used to allow the scene to change directions on a dime, and not do bizarre things such as keep going at odd places.
			When the the bunny tests the arrowhead, its arm shouldnt&apos; keep going indefinitely, as it would with procedural animation.
			Instead, it needs to stop on the frame its finger touches the arrowhead and start doing something else, such as taking its finger away from the arrowhead and having it start to smile.
		</p>
		<p>
			In short, I think Big Buck Bunny uses frame-at-at-ime animation and keyframe animation, but does not use real-time animation, procedural animation, or interpolation animation.
		</p>
		<div class="APA_references">
			<h3>References:</h3>
			<p>
				Cunningham, S.
				(2003).
				<a href="https://www.cs.csustan.edu/~rsc/NSF/Notes.pdf">Computer Graphics: Programming, Problem Solving, and Visual Communication</a>.
				Retrieved from <code>https://www.cs.csustan.edu/~rsc/NSF/Notes.pdf</code>
			</p>
		</div>
	</blockquote>
	<p>
		I checked back in with the forum, and finding no response, I added the following post for clarification:
	</p>
	<blockquote>
		<img src="/img/CC_BY-SA_4.0/y.st./coursework/CS4406/demo~_not_a_texture.png" alt="These images aren&apos;t textures!" class="framed-centred-image" width="600" height="600"/>
		<p>
			It took me a few <strong>*hours*</strong> to clean up the image enough to halfway use it as a texture, and having done that, I&apos;d like to show you what I mean when I said yesterday that the images given to us don&apos;t work as textures.
			On the top earth, I&apos;ve used the &quot;texture&quot; that the instructions told us to use.
			As you can see, there&apos;s a huge, ugly, black stripe leading from one pole to the other.
			(These spheres are seen from above, so you see the blackness on the one pole and the stripe that leads to the other pole.)
		</p>
		<p>
			On the left earth, I&apos;ve taken the original image, used trial and error to fine a threshold for a fuzzy select that gets only space, deleted space, deleted the outer ring of pixels that remained to sort of produce aliasing, cropped the image down to size, and stretched each row of pixels <strong>*individually*</strong> to produce a square image.
			Clearly, you get a much better result, and the black stripe is gone.
			As I&apos;d predicted though, there&apos;s an ugly seam.
			It&apos;s not as bad as before though.
			Also, the image is very stretched, though you can&apos;t see that as much from this angle.
		</p>
		<p>
			On the right earth, I additionally mirrored the image.
			I thought that that would mostly remove the seam.
			It did not.
			The problem is that the light and the camera used when taking this photograph aren&apos;t in alignment, so one side of the earth is lit while the other side is in shadow.
			I could try to trim the image further to remove some light and shadow, but it would result in further data loss, causing less unique land and sea formations.
		</p>
		<p>
			Anyway, as you can clearly see, the image we were given for the earth this week is in no way a texture, and takes hours to clean up into something that even resembles a texture.
			Hours spent in a {$a['2D']} image editor, and {$a['2D']} image editing seems to be outside the scope of this course.
			I know my way around the $a[GIMP], but I assume many students in taking this course don&apos;t, and wouldn&apos;t be capable of even attempting a clean-up like this.
			But not only that, even after hours of clean-up, the image still isn&apos;t suitable as a texture, and is only significantly less bad as a texture.
			And this same situation applies to the moon image.
			Again, it&apos;s got that black ring around it, meaning it will have the pole-to-pole black stripe, and has the same lighting problems that prevent a decent clean-up.
			Oh, yeah, and even without the lighting issues, there&apos;s the issue I mentioned yesterday about how only one side of the earth and moon are shown in the images, meaning that they&apos;ve got to be mirrored to the other side of the planet to avoid a seam, though because of the lighting issues, even that doesn&apos;t fix the seam issue.
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/img/CC_BY-SA_3.0/minetest.net./weblog/2019/07/26.png" alt="My pine tree farm" class="framed-centred-image" width="1024" height="600"/>
	<p>
		I did some experimenting with metal blocks in a test world, and it seems none of the five metals (four minable and one alloy) are suitible for building, given my play style.
		That means that unless the metal can be crafted into some useful form aside from its block form, it&apos;s useless to me.
		Gold can only be made into blocks and keys, and keys are only of use in multiplayer mode.
		So gold is useless.
		Tin and bronze can&apos;t be used for anything besides blocks or making bronze, and bronze is useful only for blocks or tools.
		These metals are of use in crafting tools that will mine the normally-unminable, but that&apos;s all they&apos;re good for.
		Iron has always been my favourite element, and is quite versatile in what it can be crafted into.
		I prefer to use it for crafting locked chests, but it also serves well in powered rails and carts.
		You could use it to craft a bucket too, but I&apos;d rather wait to have a bucket until I can find one in one of the dungeon chests.
		One of the new changes to the game fairly recently added chests with a little bit of treasure in them to the dungeons, and one of the possible treasures is a bucket.
		Not crafting a bucket will make finding dungeons and searching for their chests a bit more exciting, as there&apos;ll be something potentially there that I definitely want.
	</p>
	<p>
		Speaking of dungeons though, I&apos;ve dug down deep enough to reach mese blocks (though I haven&apos;t found any of those yet), and I still haven&apos;t seen a single dungeon.
		What&apos;s up with that?
		Where are all the dungeons?
		For that matter, I still haven&apos;t seen a single diamond either.
		Not that diamonds are overly useful to me as long as I have plenty of bronze, and I do.
		Still, I would have thought I would have seen at least one by now.
	</p>
	<p>
		I think I&apos;ve decided to give up on making the giant tree.
		Without being able to place sideways slabs, I&apos;m not going to be able to get the entrance to my liking.
		Instead, I think my next major project will be Fort Insomnia.
		I&apos;ve been wanting to build a fort by that name for quite a while, though I didn&apos;t know what to make it look like.
		I think I&apos;ll craft the outer wall out of logs.
		It&apos;s going to be an expensive project for sure, because of that.
		The floors will be either planks or a mix of stone blocks and stone bricks.
		I&apos;m not sure which yet.
		I&apos;m also unsure about what to use for the walls within the fort.
		I have sort of an idea about what I want the outside to look like, but not much idea what the inside should look like or even be used for.
		Before I even get started though, I&apos;ll probably want to have a full chest of pine logs ready and waiting for me.
		So aside from continuing to try to catch up on my mushroom farming, my main goal right now is to farm trees.
	</p>
</section>
<section id="promotion">
	<h2>A promotion?</h2>
	<p>
		There were a couple new employees working in the store today.
		One of them was already a shift leader, even though they were still being trained as to how to even perform the basic tasks.
	</p>
	<p>
		I was stupid to think the head manager meant it when they offered me a shift leader position.
		They offered me the position, but that&apos;s not what&apos;s actually going down.
		I&apos;m being trained as to how to perform the job in case I&apos;ll be of use later.
		I&apos;m not being trained to actually get promoted any time soon.
		But more than I was stupid, I was arrogant to think the head manager actually needs me for the role.
		Of course they don&apos;t.
		In a place like this, no one matters.
		No one is above replacement.
		Everyone is expendable.
		I&apos;ve never been needed here, nor will I ever be.
	</p>
	<p>
		But yeah.
		I&apos;m not next in line to be a shift leader, nor am I a shoe-in for the job.
		All I can say is that it&apos;s a good thing I wasn&apos;t counting on the promotion.
		I&apos;d get experience from it, as well as résumé fodder, but there&apos;s nothing about the job itself that actually appeals to me.
		Well, I guess that&apos;s not entirely true.
		I&apos;d be able to tell customers I&apos;m a manager when they&apos;re being a pain in the butt and ask to see one to talk to about me.
	</p>
</section>
END
);
